---
# vars file for configuring_app_servers
app_folders:
  - { name: "goapp", user: "{{ ansible_user }}" }
  - { name: "pyapp", user: "{{ ansible_user }}" }

file_vars:
  # data for copying nginx configs
  - {
      src_path: "nginx.conf",
      dst_path: "/etc/nginx/nginx.conf",
      user: "www-data",
      mode: "0644",
    }

  - {
      src_path: "host.conf",
      dst_path: "/etc/nginx/conf.d/{{ site_name }}.conf",
      user: "www-data",
      mode: "0644",
    }

  - {
      src_path: "index.html",
      dst_path: "/var/www/index.html",
      user: "www-data",
      mode: "0644",
    }

  # data for copying apps files
  - {
      src_path: "goapp",
      dst_path: "/apps/goapp/goapp",
      user: "{{ ansible_user }}",
      mode: "u+x",
    }

  - {
      src_path: "pyapp.py",
      dst_path: "/apps/pyapp/pyapp.py",
      user: "{{ ansible_user }}",
      mode: "0644",
    }

  - {
      src_path: "goapp.service",
      dst_path: "/etc/systemd/system/goapp.service",
      user: "{{ ansible_user }}",
      mode: "0644",
    }

  - {
      src_path: "pyapp.service",
      dst_path: "/etc/systemd/system/pyapp.service",
      user: "{{ ansible_user }}",
      mode: "0644",
    }
